﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace DCCMS.Common.Config
{
    public class DBConfig
    {
        public static readonly string DatabaseConString = ConfigurationManager.ConnectionStrings["DCCMS"].ConnectionString;
    }
    public sealed class StyleConfig
    {
        private static string _csspath = string.Empty ;
        public static readonly string DefaultStyle = ConfigurationManager.AppSettings["DefaultStyle"].ToString();
        public static string CssFolder
        {
            get
            {
                return string.Empty == _csspath ? DefaultStyle : _csspath;
            }
        }
        public static void RefreshStyle()
        {
            _csspath = ConfigurationManager.AppSettings["DefaultStyle"].ToString(); 
        }
    }

    public class GlobalConfig
    {
        public static readonly string ProjectName = ConfigurationManager.AppSettings["ProjectName"].ToString();
        public static readonly string ProjectSubTitle = ConfigurationManager.AppSettings["ProjectSubTitle"].ToString();
        public static readonly string SearchKeyWords = ConfigurationManager.AppSettings["SearchKeyWords"].ToString();
    }
}
